<!--
    -  Copyright (c) 2018-2025, haohanwork.com All rights reserved.
  -->
<template>
  <div class="execution">
    <el-input v-show="showFlag" v-model="minute" placeholder="请输入更新时间"></el-input>
    <el-tabs type="border-card" v-model="activeName" @tab-click="addNum">
      <el-tab-pane label="需采购" name="needPurchase">
        <need-purchase :minute="minute"></need-purchase>
      </el-tab-pane>
      <el-tab-pane label="可备货" name="stockUp">
        <stock-up></stock-up>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<!-- 采购退货 -->
<script>
// 引入需采购和可备货模块
import needPurchase from "./components/needPurchase";
import stockUp from "./components/stockUp";

export default {
  name: "order",
  data() {
    return {
      activeName: "needPurchase", //tab默认页面为needPurchase
      minute: 1,
      showFlag: false,
      number: 0
    };
  },
  components: {
    needPurchase,
    stockUp
  },
  methods: {
    addNum() {
      this.number++;
      console.log("addNum", this.number);
      if (this.number === 5) {
        this.showFlag = true;
      } else {
        this.showFlag = false;
      }
    }
  }
};
</script>

<style lang="scss">
.execution {
  height: 100%;
  width: 100%;
  padding: 0 10px;
  .el-tabs--border-card {
    box-shadow: none;
    height: 100%;
    border-radius: 4px 4px 0 0;
    & > .el-tabs__header {
      background-color: #f8f8f8;
      height: 54px;
      .el-tabs__item {
        height: 56px;
        line-height: 54px;
        font-size: 16px;
        color: #333;
      }
    }
    .el-tabs__content {
      padding: 20px;
      .el-card__body {
        padding: 0;
      }
    }
  }
}
</style>
